package edu.ynu.se.xiecheng.achitectureclass.demo.entity;

import edu.ynu.se.xiecheng.achitectureclass.common.entity.LogicEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.Where;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

@Getter
@Setter
@Entity
@Table(name = "greenhouse")
@Where(clause = "is_deleted = 0")
@ApiModel(description = "温室信息")
public class Greenhouse extends LogicEntity {
    @Column(name = "name")
    @ApiModelProperty(value = "温室名称", required = true)
    protected String name;

    @Column(name = "address")
    @ApiModelProperty(value = "温室地址", required = true)
    protected String address;

    @Column(name = "area")
    @ApiModelProperty(value = "温室面积（平方米）", required = true)
    protected Double area;
}